On composing expressions
On composing expressions
|
Overview
Overview
GrassmannAlgebra is a package for operating on Grassmann expressions (see the next section).
To help compose the (perhaps complex) Grassmann expressions you may want to use to explore your conjectures and generate results, GrassmannAlgebra includes a number of functions for quickly composing lengthy Grassmann expressions of various forms. These may be grouped as follows below. Note that the functions within each group are very similar. Consequently the reference pages for each one of a group differ only in the finer details.
◼
Composition of products and complements.
◼
Composition of expressions in a particular form (for example, expressed in terms of basis elements).
◼
Composition of specific types of elements (for example, points, bivectors or Grassmann numbers).
◼
Composition of the higher grade constructs generated by the underlying linear space (for example bases and metrics).
◼
Composition of lists of symbols (for use, for example, in declaring preferences)
Grassmann expressions
Grassmann expressions
The functions in GrassmannAlgebra only have meaning when operating on Grassmann expressions. To take an analogy: the Cross product of ordinary three-dimensional vector algebra only has meaning when operating on vectors of the algebra. This section defines Grassmann expressions, although in most cases it can be skipped in a first reading.
Note that whether or not an expression is a valid Grassmann expression depends on the current preferences. For example, if a is a declared symbol, then it is also a valid Grassmann expression. But if a is not a declared symbol, then it is not a valid Grassmann expression.
◼ A Grassmann expression is defined by the following set of rules:
1. A Grassmann atom is a Grassmann expression.
2. A Grassmann product of two Grassmann expressions is a Grassmann expression.
3. A Grassmann complement of a Grassmann expression is a Grassmann expression.
4. A scalar multiple of a Grassmann expression is a Grassmann expression.
5. A sum of Grassmann expressions is a Grassmann expression.
6. No other expression is a Grassmann expression.
1. A Grassmann atom is a Grassmann expression.
2. A Grassmann product of two Grassmann expressions is a Grassmann expression.
3. A Grassmann complement of a Grassmann expression is a Grassmann expression.
4. A scalar multiple of a Grassmann expression is a Grassmann expression.
5. A sum of Grassmann expressions is a Grassmann expression.
6. No other expression is a Grassmann expression.
◼ Grassmann atoms are defined to be:
◼
Declared basis elements
◼
Declared scalar symbols
◼
Declared vector symbols
◼
Declared metric symbols
◼
Special scalars
◼
Numeric quantities
◼
Graded symbols
◼ Grassmann products are defined to be:
◼
Exterior products
◼
Regressive products
◼
Interior products
◼
Generalized products
◼
Hypercomplex products
◼
Clifford products
◼ Grassmann complements are defined to be:
◼
Grassmann complements
◼
Vector space complements
◼ Scalars are defined to be any (normal) algebraic functions of scalar atoms and inner products. Scalar atoms are the scalar subset of the Grassmann atoms defined to comprise:
◼
Declared scalar symbols
◼
Special scalars
◼
Numeric quantities
◼
Graded symbols of grade 0.
◼ A Grassmann expression can always be notionally reduced to a Grassmann number in some basis.
◼ A Grassmann expression can contain powers (including reciprocals) of scalar expressions.
Examples
Examples
◼ Here is an example list of valid Grassmann expressions:
In[10]:=
T=x,x⋀y,x⋀y⋀z,(x⋀y⋀z)⊖u,((x⋀y⋀z)⊖u)⊖v,(((x⋀y⋀z)⊖u)⊖v)⋄(1+2x),(((x⋀y⋀z)⊖u)⊖v)⋄1+2x+a-⋀,(((x⋀y⋀z)⊖u)⊖v)⋄1+2x+a+-⋀;
w
2
e
1
e
2
w
2
s
{1,3}
e
1
e
2
◼ You can check whether an expression is a Grassmann expression relative to the currently declared preferences with . For this example we ensure that the default preferences have been declared by entering the alias for .
★A
In[11]:=
★A;
[T]
GrassmannExpressionQ |
Out[11]=
{True,True,True,True,True,True,True,True}
Had we chosen a different basis, the last two expressions would not be valid Grassmann expressions.
In[12]:=
DeclareBasis[{,,}];
[T]
GrassmannExpressionQ |
Out[12]=
{True,True,True,True,True,True,False,False}
Graded symbols
Graded symbols
◼ A graded symbol is any expression conforming to the pattern Underscript[_,grade], where grade is a non-negative integer, or symbolic expression representing a non-negative integer; grade may also be a list containing non-negative integers or symbolic expressions representing non-negative integers.
◼ A graded symbol of the form Underscript[_,m], where m is a single non-negative integer, or symbolic expression representing a single non-negative integer, is called a unigraded symbol.
◼ A graded symbol of the form , where the are single distinct non-negative integers (and there is more than one of them), or symbolic expressions representing single distinct non-negative integers, is called a multigraded symbol.
Underscript[_,{,,...}]
m
1
m
2
m
i
◼ Graded symbols are interpreted by GrassmannAlgebra as atomic Grassmann expressions of the specified underscripted grade.
◼ Expressions conforming to the pattern Underscript[_,0], or Underscript[_,{0}] are interpreted as scalar atoms.
◼ Expressions conforming to the pattern Underscript[_,1], or Underscript[_,{1}] are interpreted as vector atoms.
◼ Expressions conforming to the pattern Underscript[_,m], or Underscript[_,{m}] are interpreted as different graded symbols of grade m.
◼ Underscripted symbols are automatically interpreted as having the underscripted grade, independently of any declared property of the symbol. For example, is interpreted as a scalar atom, even though is interpreted as a vector atom, even though
x
0
x
may have been declared a vector symbol. a
1
a
may have been declared a scalar symbol.◼ There is no error-checking by GrassmannAlgebra functions to ensure the first argument to Underscript is an appropriate expression or that an underscript is an appropriate representation of a grade.
◼ The grades of graded symbols are not intended to be changed by using assertions (see the tutorial: ).
◼ Multigraded symbols can be converted to sums of unigraded symbols by using (see the section on Composing expression forms later in this tutorial).
In[110]:=
ComposeGradedForm |
x
0,1,2,p,
,10
|
Out[110]=
x
0
x
1
x
2
x
10
x
p
x
◼ GrassmannAlgebra makes no global assumption as to the simplicity of a unigraded element. This will depend on the particular function or rule being used. For example, and most of the Grassmann rules in the database (see the tutorial: ) will assume simplicity, whereas will not.
In[15]:=
★A;
;
[],GrassmannSimplify[⋀]
★ℬ |
4
ComposeSimpleForm |
x
2
x
2
x
2
Out[15]=
{⋀,⋀}
x
2
x
3
x
2
x
2
(The exterior product of a simple bivector with itself is always zero, but the exterior product of a non-simple bivector with itself is not zero.)
◼ You can represent a potentially non-simple element by using a sum of unigraded symbols with different "kernel" symbols. For example, a bivector .
B
in 4-space could be non-simple. You could represent this by B=+
b
1
2
b
2
2
Examples
Examples
◼ Here we determine the grades of some graded symbols.
In[112]:=
★A;Grade,,,,,
,,,
x
0
x
{0}
a
1
a
{1}
m
m
|
|
e
{0,1,2,3}
f[a]
(p+q-n)
2
x
10
Out[112]=
{0,0,1,1,m,,{0,1,2,3},,★0}
-n+p+q
2
(Note that the grade of has been returned as ★0 - the grade of zero, since is zero in the default declared 3-space. See the tutorial .)
x
10
x
10
Composing products
Composing products
◼ The quickest way to enter the products in a Grassmann expression is by using either the Basic Operations palette or the sub-palette under Composing products on the main palette.
◼ For each product the palette contains the product symbol (for example ), and a binary template (for example ⋀). The InputForm of the binary template (for example [,]) may be obtained by using the Make Template command under Mathematica's Edit menu.
⋀
◼ The products are defined by the equivalent internal Mathematica symbols.
ExteriorProduct | Wedge |
RegressiveProduct | Vee |
InteriorProduct | CircleMinus |
CliffordProduct | Diamond |
HypercomplexProduct | SmallCircle |
GeneralizedProduct | Special format |
Products and their internal Mathematica symbols
◼ The three associative products: , and are defined by GrassmannAlgebra to have the and attributes.
◼ Use parentheses to be sure of getting the precedence among the operators that you intend. If you wish to automatically display the precedence of the various products in an expression you can enter into your notebook (alias ) or check the box on the Palette. You can turn off this feature by entering (alias ) or uncheck the box on the Palette.
★P
★★P
◼ Each of the six product operations is (like many Mathematica operations). This means that inputting a product of a list of elements will give a list of products as output.
Examples
Examples
◼ To enter repeated products, you can simply continue to click on the binary template buttons. For example, clicking on the ⋀ template, then on the ⊖ template, and then twice on the ⋀ template again gives:
◼ Products are Listable.
† ShowPrecedence was developed for GrassmannAlgebra by David Park, http://home.comcast.net/~djmpark/
Composing complements
Composing complements
◼ The quickest way to enter a complement in a Grassmann expression is by using either the Basic Operations sub-palette on the palette.
◼ The complements are defined by the equivalent internal Mathematica symbols:
Complements and their internal Mathematica symbols
◼ Use parentheses to be sure of getting the precedence among the operators that you intend.
Examples
Examples
Composing expression forms
Composing expression forms
◼ These functions take a short expression and compose a more extensive Grassmann expression or tabulation from it. The new expression will be equivalent in some way to the original expression, but will usually be more typographically complex.
◼ Scalar or vector factors are automatically generated, and added to the list of declared scalar or vector symbols as appropriate.
Examples
Examples
◼ Here we have an expression to which we apply the expression composers in turn.
Composing vector space elements
Composing vector space elements
◼ Elements are either linear combinations of the currently declared basis elements, using the generated symbolic scalars as coefficients; or exterior products of these linear combinations.
◼ The symbolic scalars generated during the composition process will be automatically added to the list of currently declared scalar symbols.
◼ Each of these vector space element composers takes an optional extra argument: the index at which you want the subscripting to commence. The default value is 1. This starting index may be symbolic.
◼ See also below: Composing point space elements, Composing general elements.
Examples
Examples
◼ Here we generate a vector, bivector, and simple bivector in a 3-space.
◼ You can start the indexing wherever you like.
◼ Or you can choose your own scalar symbols by entering the functions or their aliases in placeholder form.
◼ You can compose elements of any grade. Here is a trivector in the algebra of a 4-space.
Composing point space elements
Composing point space elements
◼ Elements are either linear combinations of the currently declared basis elements, using the generated symbolic scalars as coefficients; exterior products of these linear combinations; or, in the case of the screw element, sums of the two previously mentioned forms.
◼ The symbolic scalars generated during the composition process will be automatically added to the list of currently declared scalar symbols.
◼ Each of these point space element composers takes an optional extra argument: the index at which you want the subscripting to commence. The default value is 1. This starting index may be symbolic.
◼ See also: Composing vector space elements, Composing general elements.
Examples
Examples
◼ Here we compose a point, a line element, and a plane element in a point (bound) 3-space.
◼ You can start the indexing wherever you want.
◼ Or you can choose your own scalar symbols by entering the functions or their aliases in their placeholder form.
◼ You can compose m-plane elements of any grade. Here is a 3-plane in a point 4-space.
Composing general elements
Composing general elements
◼ Elements are either linear combinations of the currently declared basis elements, using the generated symbolic scalars as coefficients; or exterior products of these linear combinations.
◼ The symbolic scalars generated during the composition process will be automatically added to the list of currently declared scalar symbols.
◼ Each of these general element composers takes an optional extra argument: the index at which you want the subscripting to commence. The default value is 1. This starting index may be symbolic.
◼ See also: Composing point space elements, Composing vector space elements.
Examples
Examples
◼ Here we tabulate Grassmann numbers in 1-, 2-, and 3-spaces.
◼ Here is a 3-element in a 4-space.
◼ Here is a simple 2-element in a 4-space.
◼ Here is the sum of a 2-element and a 3-element in a 4-space.
◼ Each of the functions also allows you to compose a template for entering your own coefficients.
Composing bases
Composing bases
◼ This section documents the functions associated with the composition of basis elements in the various exterior product spaces of the algebra.
◼ See also: Composing cobases, Composing complements of bases.
Examples
Examples
◼ Here is the basis of the exterior product space of grade 2 in a 3-space.
Composing cobases
Composing cobases
◼ See also: Composing bases, Composing complements of bases.
Examples
Examples
Composing metrics
Composing metrics
Composing complements of bases
Composing complements of bases
◼ See also the sections: Composing bases, Composing cobases, Composing metrics.
Examples
Examples
◼ Here are the default Euclidean complements of the basis elements of the algebra of a 3-space.
◼ The complements become more complex for a non-Euclidean metric.
Tabulating dimensions
Tabulating dimensions
Examples
Examples
◼ Here is a palette for the dimensions of the exterior product spaces of an 8-space.
Creating lists of symbols
Creating lists of symbols
◼ Mathematica treats all the fonts that come with your operating system as the same. For example, the letter A in Courier, Times, and Zapf Dingbats are all treated as A.
◼ But Mathematica also has a number of special fonts built in whose letters are treated as different symbols.
Examples
Examples
Here we declare the first six of each of three fonts to be scalar symbols.
Courier
Courier
Formal
Formal
Greek
Greek
Doublestruck
Doublestruck
Script
Script
Gothic
Gothic